package com.woniu34.search.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "actor",type = "actordocs",shards = 3,replicas = 1)
public class ActorSearch {


    /** 演员id(主键) */
    @Id
    @Field(index = false,type = FieldType.Long)
    private Long actorId;

    /** 演员姓名 */
    @Field(index = true,analyzer = "ik_max_word",type = FieldType.Text)
    private String actorName;

    /** 演员照片 */
    @Field(index = false, type = FieldType.Keyword)
    private String actorImg;

    /** 关注数 */
    @Field(index = false,type = FieldType.Long)
    private Long followers;

    @Field(index = false, type = FieldType.Keyword)
    private String movieNames="";


    @Override
    public String toString() {
        return "ActorSearch{" +
                "actorId=" + actorId +
                ", actorName='" + actorName + '\'' +
                ", actorImg='" + actorImg + '\'' +
                ", followers=" + followers +
                ", movieNames='" + movieNames + '\'' +
                '}';
    }

    public Long getActorId() {
        return actorId;
    }

    public void setActorId(Long actorId) {
        this.actorId = actorId;
    }

    public String getActorName() {
        return actorName;
    }

    public void setActorName(String actorName) {
        this.actorName = actorName;
    }

    public String getActorImg() {
        return actorImg;
    }

    public void setActorImg(String actorImg) {
        this.actorImg = actorImg;
    }

    public Long getFollowers() {
        return followers;
    }

    public void setFollowers(Long followers) {
        this.followers = followers;
    }

    public String getMovieNames() {
        return movieNames;
    }

    public void setMovieNames(String movieNames) {
        this.movieNames = movieNames;
    }
}
